<h1>Administracija Novosti</h1>
<?= $this->Html->link("+ Kreiraj vest", "/admin_news/create") ?>

<table>
	<tr>
		<th>Naslov</th>
		<th width="20%">Datum</th>
		<th width="1%"></th>
	</tr>
	<? foreach($news as $new): ?>
	<tr>
		<td><?= $this->Html->link($new['News']['title'], '/admin_news/edit/'.$new['News']['id']) ?></td>
		<td><?= $new['News']['date_formated'] ?></td>
		<td>
			<?= $this->Html->link('obriši', '/admin_news/delete/' . $new['News']['id'], array("onclick"=>"return confirm('Da li želite da obrišete vest?')")) ?>
		</td>
	</tr>
	<? endforeach; ?>
</table>
<?= $this->element('pagination') ?>
